package com.pinyoumei.app.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.pinyoumei.app.R;
import com.pinyoumei.app.bean.MessageBean;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by Administrator on 2021-08-09.
 * --------- 日期 ------- 维护人 ------------ 变更内容 --------
 * 2021-08-09        Administrator             新增Person类
 * 2021-08-09        Administrator             增加sex属性
 */
public class Message3Adapter extends BaseQuickAdapter<MessageBean.ResultBean.DataListBean, BaseViewHolder> {
    public Message3Adapter(int layoutResId, @Nullable List<MessageBean.ResultBean.DataListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MessageBean.ResultBean.DataListBean item) {
        ImageView imageView = helper.getView(R.id.iv_bg);
        Glide.with(mContext).load(item.getGoods_img()).into(imageView);

        helper.setText(R.id.tv_title, item.getGoods_name());

        helper.setText(R.id.tv_notice_content, item.getNotice_content());
    }
}
